package com.teaching.teachingsupport.common.pojo.dataobject;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName(value = "homework_question", autoResultMap = true)
public class HomeworkQuestion {
    @TableId(type = IdType.AUTO)
    private Long questionId;
    private Long homeworkId;
    private Integer sortOrder;
    private String questionType;  // text, single_choice, multiple_choice
    private String questionContent;
    private String answer;
    private Integer score;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<QuestionOption> options;

    @Data
    public static class QuestionOption {
        private String optionLabel;  // A, B, C, D...
        private String optionContent;
    }
} 